local dingdu = fk.CreateSkill{
  name = "lingling__dingdu",
  tags = { Skill.Limited },
}

Fk:loadTranslationTable{
  ["lingling__dingdu"] = "定都",
  [":lingling__dingdu"] = "限定技，出牌阶段，你可以视为使用无距离限制的【杀】，若造成伤害，你与其交换位置。",

  ["#lingling__dingdu"] = "定都：你可以视为使用无距离限制的【杀】，若造成伤害，你与目标交换位置",

  ["$lingling__dingdu1"] = "金龊贯日月，一箭定龙庭！",
  ["$lingling__dingdu2"] = "鸣镝裂九霄，龙兴之地入掌中！",
}

dingdu:addEffect("viewas", {
  anim_type = "offensive",
  mute_card = false,
  prompt = "#lingling__dingdu",
  card_filter = Util.FalseFunc,
  view_as = function(self, player, cards)
    if #cards ~= 0 then return end
    local card = Fk:cloneCard("slash")
    card.skillName = dingdu.name
    return card
  end,
  after_use = function (self, player, use)
    if use.damageDealt and not player.dead then
      for _, p in ipairs(use.tos) do
        if use.damageDealt[p] then
          player.room:swapSeat(player, p)
        end
      end
    end
  end,
  enabled_at_play = function(self, player)
    return player:usedSkillTimes(dingdu.name, Player.HistoryGame) == 0
  end,
})

dingdu:addEffect("targetmod", {
  bypass_distances = function (self, player, skill, card, to)
    return card and table.contains(card.skillNames, dingdu.name)
  end,
})

dingdu:addAI(nil, "vs_skill")

return dingdu
